package com.msb;

import com.msb.common.constant.OrderConstant;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Auther: xixifeng
 * @Date: 2022/11/18 - 11 - 18 - 16:23
 * @Description: com.msb
 * @version: 1.0
 */
@RocketMQMessageListener(topic = OrderConstant.ROCKETMQ_ORDER_TOPIC,consumerGroup = "${rocketmq.consumer.group}")
@Component
public class OrderMsgConsumer implements RocketMQListener<String> {


    @Override
    public void onMessage(String s) {
        // 订单关单的逻辑实现
        System.out.println(s);
    }
}